Skip to content

Update predictive scoring model

Request

Update a predictive scoring model.

Path
idinteger, (int64)required

Predictive segment to update

Bodyapplication/vnd.treasuredata.v1+json
idstring[1-9][0-9]*
typestring
Value:"predictive-segment"
attributesobject
relationshipsobject
curl -i -X PATCH \
  'https://api-cdp.treasuredata.com/entities/predictive_segments/{id}' \
  -H 'Content-Type: application/vnd.treasuredata.v1+json' \
  -d '{
    "id": "string",
    "type": "predictive-segment",
    "attributes": {
      "name": "string",
      "description": "string",
      "baseSegmentId": 0,
      "segmentId": 0,
      "scoredSegmentId": 0,
      "gradeThresholds": [
        75,
        50,
        25
      ],
      "categoricalAsColumnNames": [
        "string"
      ],
      "categoricalArrayAsColumnNames": [
        "string"
      ],
      "quantitativeAsColumnNames": [
        "string"
      ],
      "preprocess": [
        {
          "column": "string",
          "source": {
            "column": "string",
            "table": "string",
            "functions": [
              {
                "function": "+",
                "arg": 0
              }
            ]
          }
        }
      ]
    },
    "relationships": {
      "parentFolder": {
        "data": {
          "id": "string",
          "type": "folder-segment"
        }
      }
    }
  }'

Responses

Update a predictive segment

Bodyapplication/vnd.treasuredata.v1+json
dataobject(PredictiveSegmentJsonApiResourceAttr)required
includedArray of objects(UserJsonApiResource)required
Response
{ "data": { "audienceId": "string", "baseSegmentId": "string", "segmentId": "string", "scoredSegmentId": "string", "name": "string", "description": "string", "categoricalAsColumnNames": [ … ], "categoricalArrayAsColumnNames": [ … ], "quantitativeAsColumnNames": [ … ], "accuracy": 0, "areaUnderRocCurve": 0, "gradeThresholds": [ … ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "modelUpdatedAt": "2019-08-24T14:15:22Z" }, "included": [ { … } ] }